package com.logbug.thread;

import java.util.concurrent.*;

public class TestJoin {
    public static void main(String[] args) {
        final Thread t1 = new Thread(() -> {
            System.out.println("t1");
        });
        final Thread t2 = new Thread(() -> {
            try {
                t1.start();
                t1.join();
                System.out.println("t2");
            } catch (Exception e) {
                e.printStackTrace();
            }
        });
        t2.start();


    }

}
